package com.qdlc.p2p.dal.model;

import org.springframework.beans.BeanUtils;

import com.qdlc.p2p.common.util.Page;
import com.qdlc.p2p.dal.dto.LotteryRecord;

/**
 * Created by liaoxiangkai on 2015/11/30.
 */
public class LotteryRecordModel extends LotteryRecord {
    //显示记录数
    public static final int SHOW_RECORD_COUNT = 10;

    /** 当前页数 **/
    private int page;

    /** 分页数 **/
    private int rows = Page.ROWS;

    /** 用户名 */
    private String userName;

    private String searchName;

    /** 开始时间 **/
    private String startTime;

    /** 结束时间 **/
    private String endTime;

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getRows() {
        return rows;
    }

    public void setRows(int rows) {
        this.rows = rows;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getSearchName() {
        return searchName;
    }

    public void setSearchName(String searchName) {
        this.searchName = searchName;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public static LotteryRecord prototype(LotteryRecordModel model) {
        LotteryRecord lotteryRecord = new LotteryRecord();
        BeanUtils.copyProperties(model, lotteryRecord);
        return lotteryRecord;
    }

    public static LotteryRecordModel instance(LotteryRecord lotteryRecord) {
        LotteryRecordModel lotteryRecordModel  = new LotteryRecordModel();
        BeanUtils.copyProperties(lotteryRecord, lotteryRecordModel);
        return lotteryRecordModel;
    }
}
